class Actions {
    actions = {
        // 注册观察者
        onGlobalStateChange: null,
        // 修改全局状态
        setGlobalState: null
    }

    /**
     * 设置actions
    */
    setActions(actions) {
        this.actions = actions
    }


    /**
     * 映射
     * @returns
    */
    onGlobalStateChange() {
        return this.actions.onGlobalStateChange(...arguments)
    }

    /**
     * 修改全局状态
     * @returns
    */
    setGlobalState() {
        return this.actions.setGlobalState(...arguments)
    }
}

const actions = new Actions();
export default actions